package org.langqiao.io;

import java.io.File;
import java.io.IOException;

public class GetFilePath {
	
	public static void main(String[] args){
		GetFilePath gfp = new GetFilePath();
		String configFilePath = gfp.getCurrentDir()+"config.properties";
		String configFilePath1 = gfp.getCurrentDir()+"info.properties";
		System.out.println(configFilePath);
		System.out.println(configFilePath1);
	}
	
	public String getCurrentDir(){
		File directory = new File(".");
		File newPath = null;
		try {
			newPath = new File(directory.getCanonicalPath());
			newPath.mkdir();
		} catch (IOException e) {
			e.printStackTrace();
		}
		if(newPath!=null){
			return newPath.getPath()+File.separator;
		}else{
			return File.separator;
		}		
	}
}
